package com.bwie.system.controller;

import com.bwie.common.domain.User;
import com.bwie.common.result.Result;
import com.bwie.system.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/User")
public class UserController {
    @Autowired
    private UserService userService;

    @PostMapping("/findByPhone/{userPhone}")
    public Result<User> findByPhone(@PathVariable String userPhone){
        Result<User> result=userService.findByPhone(userPhone);
        return result;
    }
}
